package com.hh.designPatterns.creation.simpleFactory;

/**
 * @author huangh
 * @since 2019/11/19
 * 简单工厂
 */
public class SimpleFactory {
    public static Video create(String type) {
        Video video;
        if (type.equals("java"))
            return new JavaVideo();
        else if (type.equals("go"))
            return new GoVideo();
        return null;
    }
}
